https://doi.org/10.5072/zenodo.321593

MRIQC#

Author: Monika Doerig

Citation:

MRIQC:

  • Esteban O, Birman D, Schaer M, Koyejo OO, Poldrack RA, Gorgolewski KJ; MRIQC: Advancing the Automatic Prediction of Image Quality in MRI from Unseen Sites; PLOS ONE 12(9):e0184661; doi:10.1371/journal.pone.0184661

  • The documentation of this project is found here.

Data from OpenNeuro: Flanker Dataset

  • Kelly AMC and Uddin LQ and Biswal BB and Castellanos FX and Milham MP (2018). Flanker task (event-related). OpenNeuro Dataset ds000102. [Dataset] doi: null

  • Kelly AM, Uddin LQ, Biswal BB, Castellanos FX, Milham MP. Competition between functional brain networks mediates behavioral variability. Neuroimage. 2008 Jan 1;39(1):527-37. doi: 10.1016/j.neuroimage.2007.08.008. Epub 2007 Aug 23. PMID: 17919929.

  • Mennes, M., Kelly, C., Zuo, X.N., Di Martino, A., Biswal, B.B., Castellanos, F.X., Milham, M.P. (2010). Inter-individual differences in resting-state functional connectivity predict task-induced BOLD activity. Neuroimage, 50(4):1690-701. doi: 10.1016/j.neuroimage.2010.01.002. Epub 2010 Jan 15. Erratum in: Neuroimage. 2011 Mar 1;55(1):434

  • Mennes, M., Zuo, X.N., Kelly, C., Di Martino, A., Zang, Y.F., Biswal, B., Castellanos, F.X., Milham, M.P. (2011). Linking inter-individual differences in neural activation and behavior to intrinsic brain dynamics. Neuroimage, 54(4):2950-9. doi: 10.1016/j.neuroimage.2010.10.046

Output CPU information#

!cat /proc/cpuinfo | grep 'vendor' | uniq
!cat /proc/cpuinfo | grep 'model name' | uniq
vendor_id	: GenuineIntel
model name	: Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz

Load MRIQC#

import module
await module.purge()
await module.load('mriqc/22.0.6')
await module.list()
['mriqc/22.0.6']
!mriqc -help
You are using MRIQC v22.0.6, and a newer version is available: 24.0.2.
usage: mriqc [-h] [--version] [-v] [--species {human,rat}]
             [--participant-label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]]
             [--session-id [SESSION_ID ...]] [--run-id [RUN_ID ...]]
             [--task-id [TASK_ID ...]] [-m [MODALITIES ...]] [--dsname DSNAME]
             [--bids-database-dir PATH] [--nprocs NPROCS]
             [--omp-nthreads OMP_NTHREADS] [--mem MEMORY_GB] [--testing] [-f]
             [--pdb] [-w WORK_DIR] [--verbose-reports] [--write-graph]
             [--dry-run] [--resource-monitor] [--use-plugin USE_PLUGIN]
             [--no-sub] [--email EMAIL] [--webapi-url WEBAPI_URL]
             [--webapi-port WEBAPI_PORT] [--upload-strict] [--ants-float]
             [--ants-settings ANTS_SETTINGS] [--ica] [--fft-spikes-detector]
             [--fd_thres FD_THRES] [--deoblique] [--despike]
             [--start-idx START_IDX] [--stop-idx STOP_IDX]
             bids_dir output_dir {participant,group} [{participant,group} ...]
mriqc: error: argument -h/--help: ignored explicit argument 'elp'

Data preparation#

!datalad install https://github.com/OpenNeuroDatasets/ds000102.git
!cd ds000102 && datalad get sub-01 sub-02 sub-03
action summary:
  get (notneeded: 3)

The following section outlines key MRIQC command-line options used in this analysis. These include required positional arguments for specifying input and output directories, as well as optional flags for performance optimization and report generation. For a complete list of available options, refer to the official documentation.

Positional Arguments#

  • bids_dir: The root folder of a BIDS valid dataset (sub-XXXXX folders should be found at the top level in this folder).

  • output_dir: The directory where the output files should be stored. If you are running group level analysis this folder should be prepopulated with the results of the participant level analysis.

  • analysis_level: Possible choices: participant, group

Level of the analysis that will be performed. Multiple participant level analyses can be run independently (in parallel) using the same output_dir.

  • -v, --verbose: Increases log verbosity for each occurrence, debug level is -vvv.

Options to handle performance#

  • --nprocs, --n_procs, --n_cpus, -n-cpus Maximum number of simultaneously running parallel processes executed by MRIQC (e.g., several instances of ANTs’ registration). However, when –nprocs is greater or equal to the –omp-nthreads option, it also sets the maximum number of threads that simultaneously running processes may aggregate (meaning, with –nprocs 16 –omp-nthreads 8 a maximum of two 8-CPU-threaded processes will be running at a given time). Under this mode of operation, –nprocs sets the maximum number of processors that can be assigned work within an MRIQC job, which includes all the processors used by currently running single- and multi-threaded processes. If None, the number of CPUs available will be automatically assigned (which may not be what you want in, e.g., shared systems like a HPC cluster.

  • --mem, --mem_gb, --mem-gb: Upper bound memory limit for MRIQC processes.

Instrumental options#

  • -w, --work-dir: Path where intermediate results should be stored.

  • --verbose-reports: Generate verbose HTML reports with additional details

  • --no-sub: Turn off submission of anonymized quality metrics to MRIQC’s metrics repository.

! Warning:

--no-sub and --notrack may be necessary in environments with limited internet access, where automatic submission of quality metrics to MRIQC's web server and tracking data to NiPreps developers may fail or trigger runtime errors.

Participant-level Analysis#

%%bash
# Set the number of threads for ITK (Image Processing Toolkit) to use
export ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=6
# Set the directory for matplotlib configuration to avoid conflicts
export MPLCONFIGDIR=~/matplotlib-mpldir

# Run MRIQC
mriqc ds000102 \
        MRIQC \
        participant \
        --participant-label sub-01 sub-02 sub-03 \
        --no-sub \
        --work-dir MRIQC_workdir \
        --nprocs 6 \
        --mem-gb 10 \
        --verbose-reports \
        -v
250617-04:48:32,318 cli IMPORTANT:
	 
    Running MRIQC version 22.0.6:
      * BIDS dataset path: /neurodesktop-storage/ds000102.
      * Output folder: /neurodesktop-storage/MRIQC.
      * Analysis levels: ['participant'].

250617-04:48:32,567 nipype.workflow INFO:
	 Building functional MRIQC workflow for files: /neurodesktop-storage/ds000102/sub-01/func/sub-01_task-flanker_run-1_bold.nii.gz, /neurodesktop-storage/ds000102/sub-01/func/sub-01_task-flanker_run-2_bold.nii.gz, /neurodesktop-storage/ds000102/sub-02/func/sub-02_task-flanker_run-1_bold.nii.gz, /neurodesktop-storage/ds000102/sub-02/func/sub-02_task-flanker_run-2_bold.nii.gz, /neurodesktop-storage/ds000102/sub-03/func/sub-03_task-flanker_run-1_bold.nii.gz, /neurodesktop-storage/ds000102/sub-03/func/sub-03_task-flanker_run-2_bold.nii.gz.
250617-04:48:34,87 nipype.workflow INFO:
	 Building anatomical MRIQC workflow for 3 NIfTI files..
250617-04:48:44,106 nipype.workflow INFO:
	 Workflow mriqc_wf settings: ['check', 'execution', 'logging', 'monitoring']
250617-04:48:44,289 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.datalad_get" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/_in_file_..neurodesktop-storage..ds000102..sub-01..anat..sub-01_T1w.nii.gz/datalad_get".
250617-04:48:44,292 nipype.workflow INFO:
	 [Node] Executing "datalad_get" <mriqc.interfaces.datalad.DataladIdentityInterface>
250617-04:48:44,297 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.datalad_get" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/_in_file_..neurodesktop-storage..ds000102..sub-02..anat..sub-02_T1w.nii.gz/datalad_get".
250617-04:48:44,300 nipype.workflow INFO:
	 [Node] Executing "datalad_get" <mriqc.interfaces.datalad.DataladIdentityInterface>
250617-04:48:44,305 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.datalad_get" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/_in_file_..neurodesktop-storage..ds000102..sub-03..anat..sub-03_T1w.nii.gz/datalad_get".
250617-04:48:44,309 nipype.workflow INFO:
	 [Node] Executing "datalad_get" <mriqc.interfaces.datalad.DataladIdentityInterface>
250617-04:48:44,311 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.metadata" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-01..func..sub-01_task-flanker_run-1_bold.nii.gz/metadata".
250617-04:48:44,315 nipype.workflow INFO:
	 [Node] Executing "metadata" <niworkflows.interfaces.bids.ReadSidecarJSON>
250617-04:48:44,811 nipype.workflow INFO:
	 [Node] Finished "datalad_get", elapsed time 0.487968s.
250617-04:48:44,811 nipype.workflow INFO:
	 [Node] Finished "datalad_get", elapsed time 0.465861s.
250617-04:48:44,811 nipype.workflow INFO:
	 [Node] Finished "datalad_get", elapsed time 0.500538s.
250617-04:48:45,255 nipype.workflow INFO:
	 [Node] Finished "metadata", elapsed time 0.904097s.
250617-04:48:46,283 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.metadata" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-01..func..sub-01_task-flanker_run-2_bold.nii.gz/metadata".
250617-04:48:46,285 nipype.workflow INFO:
	 [Node] Executing "metadata" <niworkflows.interfaces.bids.ReadSidecarJSON>
250617-04:48:46,970 nipype.workflow INFO:
	 [Node] Finished "metadata", elapsed time 0.68471s.
250617-04:48:47,45 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.metadata" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-02..func..sub-02_task-flanker_run-1_bold.nii.gz/metadata".
250617-04:48:47,47 nipype.workflow INFO:
	 [Node] Executing "metadata" <niworkflows.interfaces.bids.ReadSidecarJSON>
250617-04:48:47,736 nipype.workflow INFO:
	 [Node] Finished "metadata", elapsed time 0.688402s.
250617-04:48:47,817 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.metadata" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-02..func..sub-02_task-flanker_run-2_bold.nii.gz/metadata".
250617-04:48:47,821 nipype.workflow INFO:
	 [Node] Executing "metadata" <niworkflows.interfaces.bids.ReadSidecarJSON>
250617-04:48:48,525 nipype.workflow INFO:
	 [Node] Finished "metadata", elapsed time 0.703782s.
250617-04:48:48,670 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.metadata" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-03..func..sub-03_task-flanker_run-1_bold.nii.gz/metadata".
250617-04:48:48,671 nipype.workflow INFO:
	 [Node] Executing "metadata" <niworkflows.interfaces.bids.ReadSidecarJSON>
250617-04:48:49,361 nipype.workflow INFO:
	 [Node] Finished "metadata", elapsed time 0.688903s.
250617-04:48:49,440 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.metadata" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-03..func..sub-03_task-flanker_run-2_bold.nii.gz/metadata".
250617-04:48:49,442 nipype.workflow INFO:
	 [Node] Executing "metadata" <niworkflows.interfaces.bids.ReadSidecarJSON>
250617-04:48:50,210 nipype.workflow INFO:
	 [Node] Finished "metadata", elapsed time 0.76766s.
250617-04:48:50,289 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ComputeIQMs.metadata" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-01..anat..sub-01_T1w.nii.gz/metadata".
250617-04:48:50,290 nipype.workflow INFO:
	 [Node] Executing "metadata" <niworkflows.interfaces.bids.ReadSidecarJSON>
250617-04:48:50,673 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ComputeIQMs.metadata" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-02..anat..sub-02_T1w.nii.gz/metadata".
250617-04:48:50,675 nipype.workflow INFO:
	 [Node] Executing "metadata" <niworkflows.interfaces.bids.ReadSidecarJSON>
250617-04:48:50,677 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ComputeIQMs.metadata" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-03..anat..sub-03_T1w.nii.gz/metadata".
250617-04:48:50,680 nipype.workflow INFO:
	 [Node] Executing "metadata" <niworkflows.interfaces.bids.ReadSidecarJSON>
250617-04:48:51,268 nipype.workflow INFO:
	 [Node] Finished "metadata", elapsed time 0.976739s.
250617-04:48:51,544 nipype.workflow INFO:
	 [Node] Finished "metadata", elapsed time 0.863115s.
250617-04:48:51,573 nipype.workflow INFO:
	 [Node] Finished "metadata", elapsed time 0.896598s.
250617-04:49:56,739 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.datasink" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-01..func..sub-01_task-flanker_run-1_bold.nii.gz/datasink".
250617-04:49:56,743 nipype.workflow INFO:
	 [Node] Executing "datasink" <mriqc.interfaces.bids.IQMFileSink>
250617-04:49:56,745 nipype.workflow INFO:
	 [Node] Finished "datasink", elapsed time 0.001077s.
250617-04:49:56,823 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.datasink" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-01..func..sub-01_task-flanker_run-2_bold.nii.gz/datasink".
250617-04:49:56,827 nipype.workflow INFO:
	 [Node] Executing "datasink" <mriqc.interfaces.bids.IQMFileSink>
250617-04:49:56,829 nipype.workflow INFO:
	 [Node] Finished "datasink", elapsed time 0.001024s.
250617-04:49:56,914 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.datasink" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-02..func..sub-02_task-flanker_run-1_bold.nii.gz/datasink".
250617-04:49:56,918 nipype.workflow INFO:
	 [Node] Executing "datasink" <mriqc.interfaces.bids.IQMFileSink>
250617-04:49:56,920 nipype.workflow INFO:
	 [Node] Finished "datasink", elapsed time 0.000987s.
250617-04:49:56,997 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.datasink" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-02..func..sub-02_task-flanker_run-2_bold.nii.gz/datasink".
250617-04:49:57,1 nipype.workflow INFO:
	 [Node] Executing "datasink" <mriqc.interfaces.bids.IQMFileSink>
250617-04:49:57,2 nipype.workflow INFO:
	 [Node] Finished "datasink", elapsed time 0.000759s.
250617-04:49:58,749 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.datasink" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-03..func..sub-03_task-flanker_run-1_bold.nii.gz/datasink".
250617-04:49:58,753 nipype.workflow INFO:
	 [Node] Executing "datasink" <mriqc.interfaces.bids.IQMFileSink>
250617-04:49:58,755 nipype.workflow INFO:
	 [Node] Finished "datasink", elapsed time 0.001024s.
250617-04:49:58,855 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ComputeIQMs.datasink" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-03..func..sub-03_task-flanker_run-2_bold.nii.gz/datasink".
250617-04:49:58,860 nipype.workflow INFO:
	 [Node] Executing "datasink" <mriqc.interfaces.bids.IQMFileSink>
250617-04:49:58,862 nipype.workflow INFO:
	 [Node] Finished "datasink", elapsed time 0.000892s.
250617-04:50:10,805 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:10,811 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-01..func..sub-01_task-flanker_run-1_bold.nii.gz/GenerateReport".
250617-04:50:10,811 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:10,811 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:10,815 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-01..func..sub-01_task-flanker_run-2_bold.nii.gz/GenerateReport".
250617-04:50:10,817 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:10,817 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:10,820 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-02..func..sub-02_task-flanker_run-1_bold.nii.gz/GenerateReport".
250617-04:50:10,820 nipype.workflow INFO:
	 [Node] Executing "GenerateReport" <mriqc.interfaces.reports.IndividualReport>
250617-04:50:10,821 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:10,823 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:10,825 nipype.workflow INFO:
	 [Node] Executing "GenerateReport" <mriqc.interfaces.reports.IndividualReport>
250617-04:50:10,826 nipype.workflow INFO:
	 [Node] Executing "GenerateReport" <mriqc.interfaces.reports.IndividualReport>
250617-04:50:10,842 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-02..func..sub-02_task-flanker_run-2_bold.nii.gz/GenerateReport".
250617-04:50:10,843 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:10,848 nipype.workflow INFO:
	 [Node] Executing "GenerateReport" <mriqc.interfaces.reports.IndividualReport>
250617-04:50:10,854 cli WARNING:
	 Building bold report: no exclude index was found
250617-04:50:10,855 cli WARNING:
	 Building bold report: no exclude index was found
250617-04:50:10,859 cli WARNING:
	 Building bold report: no exclude index was found
250617-04:50:10,861 cli WARNING:
	 Building bold report: no exclude index was found
250617-04:50:11,14 cli INFO:
	 Generated individual log: /neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-01..func..sub-01_task-flanker_run-2_bold.nii.gz/GenerateReport/sub-01_task-flanker_run-2_bold.html
250617-04:50:11,14 cli INFO:
	 Generated individual log: /neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-01..func..sub-01_task-flanker_run-1_bold.nii.gz/GenerateReport/sub-01_task-flanker_run-1_bold.html
250617-04:50:11,15 nipype.workflow INFO:
	 [Node] Finished "GenerateReport", elapsed time 0.19031s.
250617-04:50:11,15 nipype.workflow INFO:
	 [Node] Finished "GenerateReport", elapsed time 0.187422s.
250617-04:50:11,20 cli INFO:
	 Generated individual log: /neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-02..func..sub-02_task-flanker_run-1_bold.nii.gz/GenerateReport/sub-02_task-flanker_run-1_bold.html
250617-04:50:11,21 nipype.workflow INFO:
	 [Node] Finished "GenerateReport", elapsed time 0.19456s.
250617-04:50:11,26 cli INFO:
	 Generated individual log: /neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-02..func..sub-02_task-flanker_run-2_bold.nii.gz/GenerateReport/sub-02_task-flanker_run-2_bold.html
250617-04:50:11,27 nipype.workflow INFO:
	 [Node] Finished "GenerateReport", elapsed time 0.17692s.
250617-04:50:12,813 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:12,815 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-03..func..sub-03_task-flanker_run-1_bold.nii.gz/GenerateReport".
250617-04:50:12,815 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:12,816 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:12,818 nipype.workflow INFO:
	 [Node] Executing "GenerateReport" <mriqc.interfaces.reports.IndividualReport>
250617-04:50:12,818 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-03..func..sub-03_task-flanker_run-2_bold.nii.gz/GenerateReport".
250617-04:50:12,819 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:12,818 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:12,819 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-01..func..sub-01_task-flanker_run-1_bold.nii.gz/dsplots".
250617-04:50:12,819 cli WARNING:
	 Building bold report: no exclude index was found
250617-04:50:12,819 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:12,822 nipype.workflow INFO:
	 [Node] Executing "GenerateReport" <mriqc.interfaces.reports.IndividualReport>
250617-04:50:12,823 nipype.workflow INFO:
	 [Node] Executing "dsplots" <nipype.interfaces.io.DataSink>
250617-04:50:12,823 cli WARNING:
	 Building bold report: no exclude index was found
250617-04:50:12,848 nipype.workflow INFO:
	 [Node] Finished "dsplots", elapsed time 0.023997s.
250617-04:50:12,856 cli INFO:
	 Generated individual log: /neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-03..func..sub-03_task-flanker_run-2_bold.nii.gz/GenerateReport/sub-03_task-flanker_run-2_bold.html
250617-04:50:12,857 nipype.workflow INFO:
	 [Node] Finished "GenerateReport", elapsed time 0.03387s.
250617-04:50:12,860 cli INFO:
	 Generated individual log: /neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-03..func..sub-03_task-flanker_run-1_bold.nii.gz/GenerateReport/sub-03_task-flanker_run-1_bold.html
250617-04:50:12,861 nipype.workflow INFO:
	 [Node] Finished "GenerateReport", elapsed time 0.042306s.
250617-04:50:12,950 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:12,950 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-01..func..sub-01_task-flanker_run-2_bold.nii.gz/dsplots".
250617-04:50:12,950 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:12,952 nipype.workflow INFO:
	 [Node] Executing "dsplots" <nipype.interfaces.io.DataSink>
250617-04:50:12,976 nipype.workflow INFO:
	 [Node] Finished "dsplots", elapsed time 0.02285s.
250617-04:50:13,59 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:13,59 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-02..func..sub-02_task-flanker_run-1_bold.nii.gz/dsplots".
250617-04:50:13,60 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:13,62 nipype.workflow INFO:
	 [Node] Executing "dsplots" <nipype.interfaces.io.DataSink>
250617-04:50:13,83 nipype.workflow INFO:
	 [Node] Finished "dsplots", elapsed time 0.020601s.
250617-04:50:13,160 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:13,160 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-02..func..sub-02_task-flanker_run-2_bold.nii.gz/dsplots".
250617-04:50:13,160 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:13,163 nipype.workflow INFO:
	 [Node] Executing "dsplots" <nipype.interfaces.io.DataSink>
250617-04:50:13,184 nipype.workflow INFO:
	 [Node] Finished "dsplots", elapsed time 0.020954s.
250617-04:50:14,766 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:14,766 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-03..func..sub-03_task-flanker_run-1_bold.nii.gz/dsplots".
250617-04:50:14,766 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:14,768 nipype.workflow INFO:
	 [Node] Executing "dsplots" <nipype.interfaces.io.DataSink>
250617-04:50:14,792 nipype.workflow INFO:
	 [Node] Finished "dsplots", elapsed time 0.023035s.
250617-04:50:14,879 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:14,879 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/funcMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-03..func..sub-03_task-flanker_run-2_bold.nii.gz/dsplots".
250617-04:50:14,879 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.funcMRIQC.ReportsWorkflow.dsplots".
250617-04:50:14,886 nipype.workflow INFO:
	 [Node] Executing "dsplots" <nipype.interfaces.io.DataSink>
250617-04:50:14,909 nipype.workflow INFO:
	 [Node] Finished "dsplots", elapsed time 0.021517s.
250617-04:50:18,779 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ComputeIQMs.datasink" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-01..anat..sub-01_T1w.nii.gz/datasink".
250617-04:50:18,783 nipype.workflow INFO:
	 [Node] Executing "datasink" <mriqc.interfaces.bids.IQMFileSink>
250617-04:50:18,785 nipype.workflow INFO:
	 [Node] Finished "datasink", elapsed time 0.00133s.
250617-04:50:20,766 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ComputeIQMs.datasink" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-02..anat..sub-02_T1w.nii.gz/datasink".
250617-04:50:20,772 nipype.workflow INFO:
	 [Node] Executing "datasink" <mriqc.interfaces.bids.IQMFileSink>
250617-04:50:20,774 nipype.workflow INFO:
	 [Node] Finished "datasink", elapsed time 0.000776s.
250617-04:50:20,860 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ComputeIQMs.datasink" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ComputeIQMs/_in_file_..neurodesktop-storage..ds000102..sub-03..anat..sub-03_T1w.nii.gz/datasink".
250617-04:50:20,864 nipype.workflow INFO:
	 [Node] Executing "datasink" <mriqc.interfaces.bids.IQMFileSink>
250617-04:50:20,866 nipype.workflow INFO:
	 [Node] Finished "datasink", elapsed time 0.00088s.
250617-04:50:20,943 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:20,945 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ReportsWorkflow.GenerateReport" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-01..anat..sub-01_T1w.nii.gz/GenerateReport".
250617-04:50:20,945 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:20,948 nipype.workflow INFO:
	 [Node] Executing "GenerateReport" <mriqc.interfaces.reports.IndividualReport>
250617-04:50:21,61 cli INFO:
	 Generated individual log: /neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-01..anat..sub-01_T1w.nii.gz/GenerateReport/sub-01_T1w.html
250617-04:50:21,62 nipype.workflow INFO:
	 [Node] Finished "GenerateReport", elapsed time 0.113073s.
250617-04:50:22,836 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:22,839 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ReportsWorkflow.GenerateReport" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-02..anat..sub-02_T1w.nii.gz/GenerateReport".
250617-04:50:22,839 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:22,841 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:22,844 nipype.workflow INFO:
	 [Node] Executing "GenerateReport" <mriqc.interfaces.reports.IndividualReport>
250617-04:50:22,844 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ReportsWorkflow.GenerateReport" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-03..anat..sub-03_T1w.nii.gz/GenerateReport".
250617-04:50:22,845 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.GenerateReport".
250617-04:50:22,845 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.dsplots".
250617-04:50:22,845 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ReportsWorkflow.dsplots" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-01..anat..sub-01_T1w.nii.gz/dsplots".
250617-04:50:22,845 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.dsplots".
250617-04:50:22,848 nipype.workflow INFO:
	 [Node] Executing "GenerateReport" <mriqc.interfaces.reports.IndividualReport>
250617-04:50:22,851 nipype.workflow INFO:
	 [Node] Executing "dsplots" <nipype.interfaces.io.DataSink>
250617-04:50:22,993 nipype.workflow INFO:
	 [Node] Finished "dsplots", elapsed time 0.141165s.
250617-04:50:23,36 cli INFO:
	 Generated individual log: /neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-02..anat..sub-02_T1w.nii.gz/GenerateReport/sub-02_T1w.html
250617-04:50:23,37 nipype.workflow INFO:
	 [Node] Finished "GenerateReport", elapsed time 0.1922s.
250617-04:50:23,40 cli INFO:
	 Generated individual log: /neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-03..anat..sub-03_T1w.nii.gz/GenerateReport/sub-03_T1w.html
250617-04:50:23,41 nipype.workflow INFO:
	 [Node] Finished "GenerateReport", elapsed time 0.19118s.
250617-04:50:24,793 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.dsplots".
250617-04:50:24,794 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ReportsWorkflow.dsplots" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-02..anat..sub-02_T1w.nii.gz/dsplots".
250617-04:50:24,794 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.dsplots".
250617-04:50:24,798 nipype.workflow INFO:
	 [Node] Executing "dsplots" <nipype.interfaces.io.DataSink>
250617-04:50:24,982 nipype.workflow INFO:
	 [Node] Finished "dsplots", elapsed time 0.182019s.
250617-04:50:25,73 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.dsplots".
250617-04:50:25,73 nipype.workflow INFO:
	 [Node] Setting-up "mriqc_wf.anatMRIQC.ReportsWorkflow.dsplots" in "/neurodesktop-storage/MRIQC_workdir/mriqc_wf/anatMRIQC/ReportsWorkflow/_in_file_..neurodesktop-storage..ds000102..sub-03..anat..sub-03_T1w.nii.gz/dsplots".
250617-04:50:25,74 nipype.workflow INFO:
	 [Node] Outdated cache found for "mriqc_wf.anatMRIQC.ReportsWorkflow.dsplots".
250617-04:50:25,76 nipype.workflow INFO:
	 [Node] Executing "dsplots" <nipype.interfaces.io.DataSink>
250617-04:50:25,223 nipype.workflow INFO:
	 [Node] Finished "dsplots", elapsed time 0.145832s.
250617-04:50:26,708 cli IMPORTANT:
	 Participant level finished successfully.
250617-04:50:26,708 cli INFO:
	 Generating BIDS derivatives metadata.
250617-04:50:26,708 cli INFO:
	 MRIQC completed.
You are using MRIQC v22.0.6, and a newer version is available: 24.0.2.

Group-level Analysis#

%%bash
mriqc ds000102 \
        MRIQC \
        group \
        --no-sub \
        --work-dir MRIQC_workdir \
        --nprocs 6 \
        --mem-gb 10 \
        --verbose-reports \
        -v                           
You are using MRIQC v22.0.6, and a newer version is available: 24.0.2.

MRIQC Visual Reports#

MRIQC automatically generates individual and group-level reports to support the quality assessment of MRI data.

Individual reports include mosaic views of anatomical or functional images along various cutting planes, along with overlays like segmentation contours or motion estimates. These visuals help quickly screen for artifacts or other issues. They are especially useful for reviewing images that may have been flagged as low-quality by the automated classifier.

Group reports compile quality metrics across all subjects and display interactive scatter plots for each image quality metric (IQM). These plots make it easy to spot outliers—clicking on any point in the scatter plot refers to the corresponding individual report for that subject.

These embedded reports offer an intuitive way to explore quality metrics and support decisions about excluding or further examining specific runs or subjects.

Anatomical Report#

%%capture 
! pip install beautifulsoup4
from bs4 import BeautifulSoup, element, Doctype
from IPython.display import HTML, display

with open('./MRIQC/sub-01_T1w.html') as f:
    soup = BeautifulSoup(f, 'html.parser')

# Remove scripts and interactive elements
for tag in soup(['script', 'style', 'button', 'nav', 'head']):
    tag.decompose()
# for e in soup:
#     if isinstance(e, element.ProcessingInstruction):
#         e.extract()
#         break

with open("./soup.txt", "w") as f:
  f.write(str(soup))
# print(str(soup))
display(HTML(str(soup)))

MRIQC: individual T1w report

Summary

  • BIDS filename: sub-01_T1w.
  • Date and time: 2025-06-17, 04:50.
  • MRIQC version: 22.0.6.
  • Workflow details:
    • Detected a zero-filled frame, has the original image been rotated?

Visual reports

Zoomed-in (brain mask)
2025-06-13T05:27:56.076823 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Background noise
2025-06-13T05:07:15.753068 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Approximate spatial normalization
Brain mask
2025-06-13T05:28:11.871360 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Brain tissue segmentation
2025-06-13T05:47:32.095926 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Artifacts in background
2025-06-13T05:40:13.919329 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Head outline
2025-06-13T05:35:05.843015 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
"Hat" mask
2025-06-13T05:40:13.130519 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Distribution of the noise in the background
2025-06-13T05:40:48.770216 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/

Other

Rate Image

  • Exclude
  • Poor
  • Acceptable
  • Excellent

Comments

Rater confidence:

  • Doubtful
  • Confident

For details on the IQMs (image quality metrics) and further information on the enclosed plots, please read the documentation.

Functional Report#

with open('./MRIQC/sub-02_task-flanker_run-1_bold.html') as f:
    soup = BeautifulSoup(f, 'html.parser')

for tag in soup(['script', 'style', 'button', 'nav', 'head']):
    tag.decompose()

display(HTML(str(soup)))

MRIQC: individual bold report

Summary

  • BIDS filename: sub-02_task-flanker_run-1_bold.
  • Date and time: 2025-06-17, 04:50.
  • MRIQC version: 22.0.6.
  • Workflow details:
    • Framewise Displacement was computed using 3dvolreg (AFNI)
    • Framewise Displacement threshold was defined at 0.200000 mm

Visual reports

BOLD average
2025-06-13T05:17:26.520372 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Standard deviation map
2025-06-13T05:17:30.793602 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
FMRI summary plot
2025-06-13T05:35:20.649686 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Zoomed-in BOLD average
2025-06-13T05:29:00.269554 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Background noise
2025-06-13T05:17:31.351680 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Calculated brain mask
2025-06-13T05:28:54.103644 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Approximate spatial normalization

Other

Rate Image

  • Exclude
  • Poor
  • Acceptable
  • Excellent

Comments

Rater confidence:

  • Doubtful
  • Confident

For details on the IQMs (image quality metrics) and further information on the enclosed plots, please read the documentation.

Group functional report#

with open('./MRIQC/group_bold.html', 'r') as f:
    html = f.read()


display(HTML(html))
MRIQC: group bold report

MRIQC: group bold report

Summary

  • Date and time: 2025-06-17, 04:50.
  • MRIQC version: 22.0.6.